package A001singleton;

public class A002Singleton饿汉式02_枚举 {

    public static enum Singleton {
        /**
         * 枚举类型：表示该类型是有限的几个
         */
        INSTANCE
    }

    public static void main(String[] args) {
        System.out.println(Singleton.INSTANCE == Singleton.INSTANCE);
        System.out.println(Singleton.INSTANCE == Singleton.INSTANCE);
    }
}
